import React from 'react';
import styles from './style.css'
import Column3 from "../../../component/column3";
import MyIconImage from "../../../component/MyIconImage";
import {ActionSheet} from 'antd-mobile';


export class FriendQuanHeader extends React.Component {
    constructor(props) {
        super()
        this.state = {
            clicked: ""
        }
    }

    componentDidMount() {
    }

    showTip(e) {
        this.showActionSheet()
    }

    showActionSheet = () => {
        const BUTTONS = ['发文字', '发图片', '发文字图片', "取消"];
        ActionSheet.showActionSheetWithOptions({
                options: BUTTONS,
                cancelButtonIndex: BUTTONS.length - 1,
                // destructiveButtonIndex: BUTTONS.length - 2,
                // title: 'title',
                // message: 'I am description, description, description',
                maskClosable: true,
                'data-seed': 'logId',
            },
            (buttonIndex) => {
                this.setState({clicked: BUTTONS[buttonIndex]});
            });
    }


    render() {
        var self = this
        return <div className={styles.header}>
            <Column3
                myStyle={{padding: 5}}
                leftSpan={1}
                centerSpan={7}
                rightSpan={1}
            >
                <div className={styles.left}>
                    <MyIconImage image={"http://pj5qx5lsj.bkt.clouddn.com/Left.png"} onClick={() => {
                        self.props.setStore("app.bottom", "首页")
                        history.go(-1)
                    }}/>
                </div>
                <div className={styles.center}>我的朋友圈</div>
                <div className={styles.right}>
                    <MyIconImage
                        onClick={this.showTip.bind(this)}
                        image={"http://pj5qx5lsj.bkt.clouddn.com/%E8%AE%BE%E7%BD%AE.png"}/>
                </div>
            </Column3>
        </div>
    }
}

FriendQuanHeader.defaultProps = {}
export default FriendQuanHeader